﻿using Kingdee.BOS.Core.DynamicForm.PlugIn;
using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;
using Kingdee.BOS.Util;
using System.ComponentModel;

namespace HX.HxDemo.BOS.Business.PlugIn25011701
{
    [Description("【表单插件】 BeforeCreateNewEntryRow"),HotUpdate]
    public class BeforeCreateNewEntryRowFormPlugIn : AbstractDynamicFormPlugIn
    {
        public override void BeforeCreateNewEntryRow(BeforeCreateNewEntryEventArgs e)
        {
            base.BeforeCreateNewEntryRow(e);
            if(e.Entity.Key.EqualsIgnoreCase("FPOOrderEntry") && this.Context.UserName == "demo")
            {
                e.Cancel = true;
                this.View.ShowMessage("禁止当前用户新增分录行！");
            }
        }

    }
}
